package com.demo.dao;

import com.demo.model.User2;
import org.apache.ibatis.annotations.*;

import java.util.List;

public interface User2Dao {
    @InsertProvider(type = com.demo.dao.mapper.User2Mapper.class, method = "insert")
    @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
    public int insert(User2 user2);

    @DeleteProvider(type = com.demo.dao.mapper.User2Mapper.class, method = "delete")
    public Integer delete(Integer id);

    @UpdateProvider(type = com.demo.dao.mapper.User2Mapper.class, method = "update")
    public Integer update(User2 user2);

    @SelectProvider(type = com.demo.dao.mapper.User2Mapper.class, method = "select")
    public List<User2> select(String username);

    @SelectProvider(type = com.demo.dao.mapper.User2Mapper.class, method = "selectOne")
    public User2 selectOne(Integer id);
}
